<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>moo.Gears WorkerPool Demo</title>
</head>
<body>
<div id="message_place"></div>
<div id="map_canvas" style="width: 500px; height: 400px"></div>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1");
window.onload = function(){
	var workerPool = $.gears('beta.workerpool');
	if(workerPool){
		// If Gears install
		workerPool.onmessage = function(a, b, message) {
	    	alert('Received message from worker ' + message.sender + ': \n' + message.body);
		};
		var childWorkerId = workerPool.createWorkerFromUrl('worker.js');
		workerPool.sendMessage(["3..2..", 1, {helloWorld: "Hello world!"}], childWorkerId);
	}
}
</script>
<script src="jquery.gears.js"></script>
</body>
</html>
